<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 属性选择器 */
        [type=text] {
            background-color: red;
        }
    </style>
</head>

<body>
    <input type="text" name="" id="">
    <input type="password" name="" id="">
</body>

</html>